//
//  TMessageController.h
//  UIKit
//
//  Created by kennethmiao on 2018/9/18.
//  Copyright © 2018年 kennethmiao. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "TMessageCell.h"
#import "TConversationCell.h"
#import "YBMessageManager.h"

@class TMessageController;
@protocol TMessageControllerDelegate <NSObject>
@optional
- (void)didTapInMessageController:(TMessageController *)controller;
- (void)didHideMenuInMessageController:(TMessageController *)controller;
- (BOOL)messageController:(TMessageController *)controller willShowMenuInView:(UIView *)view;
- (void)messageController:(TMessageController *)controller didSelectMessages:(NSMutableArray *)msgs atIndex:(NSInteger)index;
- (void)reciveGiftMessage:(NSDictionary *)giftRes;

@end

@interface TMessageController : UITableViewController
@property(nonatomic,assign)MsgUiType msgUiType;
@property(nonatomic,assign)UiFrom uiFrom;
@property (nonatomic, weak) id<TMessageControllerDelegate> delegate;
- (void)sendMessage:(TMessageCellData *)msg;
- (void)scrollToBottom:(BOOL)animate;
- (void)setConversation:(TConversationCellData *)conversation;
- (void)sendImageMessage:(UIImage *)image andIndex:(int)index;
- (void)sendVideoMessage:(NSURL *)url;
- (void)sendFileMessage:(NSURL *)url;
- (void)sendCustomMessage:(NSDictionary *)dic;
/// 粗略获取发送条数
-(int)sendMsgNums;

@end
